﻿package com.fecesaids.greatgame.adventuregame {
	import flash.display.MovieClip;
	import flash.events.*
	public class MouseTargetCursor extends MovieClip {
		public function MouseTargetCursor():void {
			mouseEnabled = false;
			mouseChildren = false;
		}
		public function followMouse(doFollow:Boolean):void {
			if(doFollow){
				stage.addEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
				this.x = stage.mouseX;
				this.y = stage.mouseY;
			}
			else{
				stage.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMoveHandler);
			}
		}
		private function mouseMoveHandler(evt:MouseEvent):void {
			this.x = stage.mouseX;
			this.y = stage.mouseY;
		}
	}
}